use ironrdp_graphics::dwt::*;

#[test]
fn encode_works_for_min_values() {
    let mut buffer = [-32768; 4096];
    let expected = ENCODED_DWT_FOR_MIN_VALUES;

    let mut temp = vec![0; 4096];
    encode(&mut buffer, temp.as_mut_slice());
    assert_eq!(expected.as_ref(), buffer.as_ref());
}

#[test]
fn encode_works_for_max_values() {
    let mut buffer = [32767; 4096];
    let expected = ENCODED_DWT_FOR_MAX_VALUES;

    let mut temp = vec![0; 4096];
    encode(&mut buffer, temp.as_mut_slice());
    assert_eq!(expected.as_ref(), buffer.as_ref());
}

#[test]
fn encode_works_for_regular_values() {
    let mut buffer = DECODED_DWT;
    let expected = ENCODED_DWT;

    let mut temp = vec![0; 4096];
    encode(&mut buffer, temp.as_mut_slice());
    assert_eq!(expected.as_ref(), buffer.as_ref());
}

#[test]
fn decode_works_for_min_values() {
    let mut buffer = [-32768; 4096];
    let expected = [0; 4096];

    let mut temp = vec![0; 4096];
    decode(&mut buffer, temp.as_mut_slice());
    assert_eq!(expected.as_ref(), buffer.as_ref());
}

#[test]
fn decode_works_for_max_values() {
    let mut buffer = [32767; 4096];
    let expected = DECODED_DWT_FOR_MAX_VALUES;

    let mut temp = vec![0; 4096];
    decode(&mut buffer, temp.as_mut_slice());
    assert_eq!(expected.as_ref(), buffer.as_ref());
}

#[test]
fn decode_works_for_regular_values() {
    let mut buffer = ENCODED_DWT;
    let expected = DECODED_DWT;

    let mut temp = vec![0; 4096];
    decode(&mut buffer, temp.as_mut_slice());
    assert_eq!(expected.as_ref(), buffer.as_ref());
}

// Is this actually correct?
const ENCODED_DWT_FOR_MIN_VALUES: [i16; 4096] = [
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
    -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
    -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
    -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
    -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
];

// Is this actually corre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 32767, 32767,
    32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767,
    32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767,
    32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767, 32767,
    32767, 32767,
];

const DECODED_DWT_FOR_MAX_VALUES: [i16; 4096] = [
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383,
    -4, 16383, 16379, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2, 32764, 32764, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2, -2, -2, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194,
    -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2,
    32764, 32764, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383,
    -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -2, 32764, 32764, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -6, 16381, 16377, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2,
    -2, -2, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194,
    -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2, 32764, 32764, 2, 4092, 8191, -4100, -16383, -4100, 8191,
    4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092,
    8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100,
    -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4,
    16383, 16379, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100,
    -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4, 16383, 16379, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2, 32764, 32764, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, -16383, -32768, -16385,
    -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2, -2, -2, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194,
    -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2,
    32764, 32764, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383,
    -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -2, 32764, 32764, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -6, 16381, 16377, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2,
    -2, -2, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194,
    -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2, 32764, 32764, 2, 4092, 8191, -4100, -16383, -4100, 8191,
    4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092,
    8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100,
    -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4,
    16383, 16379, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100,
    -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4, 16383, 16379, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2, 32764, 32764, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, -16383, -32768, -16385,
    -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2, -2, -2, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194,
    -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2,
    32764, 32764, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383,
    -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -2, 32764, 32764, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -6, 16381, 16377, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2,
    -2, -2, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194,
    -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2, 32764, 32764, 2, 4092, 8191, -4100, -16383, -4100, 8191,
    4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092,
    8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100,
    -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4,
    16383, 16379, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100,
    -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4, 16383, 16379, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2, 32764, 32764, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194,
    -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, -16383, -32768, -16385,
    -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2, -2, -2, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194,
    -4100, 2, -4100, -8194, -12294, -16385, -6, 16381, 16377, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194,
    -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -2,
    32764, 32764, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383,
    -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100,
    8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2,
    4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191,
    -4100, -16383, -4100, 8191, 4092, 2, 4092, 8191, -4100, -16383, -4, 16383, 16379, 2, 8191, 16381, -8194, -32768,
    -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381,
    8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2,
    8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381, -8194, -32768, -8194, 16381, 8191, 2, 8191, 16381,
    -8194, -32768, -2, 32764, 32764, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294, -16385, -12294, -8194, -4100, 2, -4100, -8194, -12294,
    -16385, -6, 16381, 16377, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2,
    -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -16385, -32768, -16383, 2, -16383, -32768, -16385, -2, -2,
    -2, -2, 2, -4, -2, -6, -2, -6, -2, -4, 2, -4, -2, -6, -2, -6, -2, -4, 2, -4, -2, -6, -2, -6, -2, -4, 2, -4, -2, -6,
    -2, -6, -2, -4, 2, -4, -2, -6, -2, -6, -2, -4, 2, -4, -2, -6, -2, -6, -2, -4, 2, -4, -2, -6, -2, -6, -2, -4, 2, -4,
    -2, -6, -2, -7, -4, -8, 2, 16383, 32764, 16381, -2, 16381, 32764, 16383, 2, 16383, 32764, 16381, -2, 16381, 32764,
    16383, 2, 16383, 32764, 16381, -2, 16381, 32764, 16383, 2, 16383, 32764, 16381, -2, 16381, 32764, 16383, 2, 16383,
    32764, 16381, -2, 16381, 32764, 16383, 2, 16383, 32764, 16381, -2, 16381, 32764, 16383, 2, 16383, 32764, 16381, -2,
    16381, 32764, 16383, 2, 16383, 32764, 16381, -2, -4, -6, -6, 2, 16379, 32764, 16377, -2, 16377, 32764, 16379, 2,
    16379, 32764, 16377, -2, 16377, 32764, 16379, 2, 16379, 32764, 16377, -2, 16377, 32764, 16379, 2, 16379, 32764,
    16377, -2, 16377, 32764, 16379, 2, 16379, 32764, 16377, -2, 16377, 32764, 16379, 2, 16379, 32764, 16377, -2, 16377,
    32764, 16379, 2, 16379, 32764, 16377, -2, 16377, 32764, 16379, 2, 16379, 32764, 16377, -2, -8, -6, -10,
];

const ENCODED_DWT: [i16; 4096] = [
    0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 256, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0,
    0, 0, 0, -128, 128, 0, 0, 0, 0, 0, 0, 0, 0, -384, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 256, 0, 0, 0, 0, 0, 0, 0, 128, 0,
    -256, 512, -640, -128, 0, 0, 0, 0, 0, 0, -128, -384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -384, 0, 384, 0, 0, 0, 0, 0, 0,
    -128, 512, 512, -640, -128, 0, 0, 0, 0, 0, 0, -256, 640, 0, 0, 0, 0, 0, 0, 256, 128, 0, 256, -640, -512, 128, 0, 0,
    0, 0, 0, 0, 128, 384, -128, 640, 0, -128, 0, 0, 0, 0, 0, -256, -256, -384, 0, 0, 0, 0, 0, 384, 0, 0, 896, 0, -512,
    0, 0, 0, 0, 0, 0, 0, 0, -128, 0, -128, 256, -128, 0, 0, 0, 0, 0, -384, 128, 640, 0, 0, 0, 0, 0, 0, -128, 0, 0, 128,
    896, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 256, 0, 0, 0, -256, 0, 0, 0, 0, 0, 128, 0, -1152, -384,
    640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 0, 0, -128, -128, -128, 0, 0, 0, 0, 0, 0, 768, -256,
    -1024, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, -384, 0, 0, 0, 0, 0, 0, -128, 0, -128, 0, 640,
    256, 384, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 256, 0, 0, 0, 0, 0, 0, -128, 128, 0, 0, -128, 256, 0, 0, 128, 0, 0, -128,
    0, -128, 896, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -384, -256, 0, 0, 0, 0, 0, 384, -128, 0, -128, 0, 128, 0, 0, 0, 128,
    256, -128, 0, -640, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, -384, -512, 0, 0, 0, 0, 0, -128, -768, 128, 0, -128, 0, 0, 0,
    0, 0, 0, 0, 768, 0, -128, 0, 128, 0, 0, 128, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, -640, 0, 0, 0, 0, 0, 0, 0,
    0, 0, -128, -128, 128, 1280, 0, 0, 0, -128, 128, 0, 0, 0, 0, -128, 128, 0, 0, 0, 0, 0, 0, 896, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 128, -640, -640, 384, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, -128, 0, 0, 0, 0, 0, -128, -256, 0, 0, 0, -128, 0,
    0, 0, 0, 0, 0, 384, -128, -896, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, -768, 0, 0, 0, 0, 0, 0, -1024, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 384, 256, 512, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0, 768, -128, 0, 0, 0, 0, -128, 896, -128, 0, 0, 0, -128,
    -128, 0, 0, 0, 0, 0, -384, -128, 768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 128, 0, 0, 0, 0, 0, 512, 128, 256, -256,
    -256, 0, -128, 0, 0, 0, 0, 128, -128, -896, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -768, 0, 0, 0, 0, 0, -128, -1280,
    384, 128, 256, 0, -256, 128, 128, 0, 0, 0, 0, 0, -128, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 384, -256, 0, 0, 0, 0, 0,
    768, -1024, -256, 0, -256, 128, 0, 0, -128, -128, -128, 128, 128, 128, 768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 512, 128,
    0, 0, 0, 0, 0, 384, 256, 0, 128, 0, 0, 128, 128, 0, 0, 128, -256, 640, -384, 256, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0,
    -256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, -384, 0, 128, 0, 0, 128, 128, 0, 0, 0, 0, 0,
    -512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 128, -128, -128, 0, 0, 128, 0, 0, 0, 384,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 128, 128, 128, -256, 0, 128, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, -256, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, -128, -128, 0, 0, -128, -128,
    128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, -128, -128, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, -128, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 128, 0, 0,
    0, 0, 0, 0, -256, -1024, 256, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0,
    128, 0, -256, 512, 512, -128, 0, 0, 0, 0, 0, 0, -128, 384, -128, 0, 0, 0, 0, 0, 0, 128, 0, 0, 128, 0, 0, 0, 0, 0,
    0, 0, 0, -128, 384, 384, -896, -128, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 128, 0, 0, 0,
    0, 0, 0, 0, 128, 0, 0, 768, 384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, -1024, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, -256, -256, 256, -128, 0, 0, -128, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, 0, 128, 128, 384, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 0, -128, -640, -384, -512, -768, -768, 896, 128, 128, -128, 0, 0, 0, 0, 0, 0, 0,
    -128, -256, -384, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 256, -128, 0, -256, -384, 128, 128, -1024, 768, 0, -128,
    128, 0, 0, 0, 0, 128, 128, 0, 0, 768, -384, -128, 0, 0, 0, 0, 0, -128, 640, 256, -768, -256, 0, 0, 0, 256, 896,
    -768, -128, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, -128, -128, 128, 768, 0, 0, 0, 0, 0, 0, -256, 128, 0, 0, 0, 0, 0, 0,
    0, -128, 768, -128, 128, -768, 896, 0, 0, 0, 0, 0, 0, 0, 0, 128, -128, -128, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, -128, -256, 0, -1024, 768, 768, 512, 384, 384, 512, -128, -256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 256, -128, -128, 896, -1024, 0, 128, -256, -512, -384, -128, 128, -384, -512, 128, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 128, -384, -640, 0, 128, 0, 0, 1024, -128, -896, -1152, -896, -256, 768, 384, 0,
    0, 0, 0, 0, 0, 0, 128, 0, 0, 0, -128, -128, 0, 0, 0, 0, 0, 128, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, -128, 128, 0, 0, 0, 0, 0, -128, 128, 0, 0, 128, -128, 0, 0, 0,
    0, -128, 128, -128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 128, -128, 0, 0, 0, 0,
    0, 0, 128, 128, 384, 384, 0, 128, 128, -128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0,
    128, 0, 0, 0, 256, 128, -512, -640, -1024, -768, -512, 128, 0, 0, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    128, 0, 0, 0, 0, 384, -1152, -640, 1280, 256, 256, 0, -128, 256, 768, -512, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, -128, 256, -128, -128, 128, 0, 0, 0, 0, 0, -128, 512, -256, -128, 128, -128, 128, -128,
    0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, -256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, -256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -256,
    -256, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -256, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 64, 0, 0, 64, 0, 0, 0, 0, 0, 0, -64, 0, 0, -64,
    -64, 0, -320, 192, -128, 64, 0, -64, 0, 0, 0, 0, 64, -256, -64, 0, 0, 64, -320, -128, 64, 64, 64, 384, -128, -64,
    0, 64, -256, 1344, 384, 0, 0, -320, -64, 64, 128, 256, 256, 192, 320, 0, 0, -64, 256, -512, -704, 0, 0, -128, 512,
    -64, 0, 192, 64, -1152, 1024, 64, -64, 128, 0, -256, -256, 0, 0, -384, 64, -192, -64, 64, 896, -1472, 64, 0, 64, 0,
    64, -192, -64, 0, 0, 0, -320, -128, 192, -64, 704, -512, -192, 0, 64, 0, -64, -192, 64, 0, 896, 64, 0, -64, 0, 0,
    -960, -128, 448, 64, -64, 64, -192, -64, -64, -128, -896, 0, 64, 0, 0, 320, -1152, 896, -448, -64, -64, -128, 832,
    64, -64, 192, -896, 64, -128, 128, -64, 704, -1024, -128, 128, -64, 64, 0, -576, 0, -64, 1216, 64, 64, 64, 0, 128,
    128, 512, 0, 0, 0, 0, 64, -832, 0, 0, -384, -192, -64, 0, -128, -128, 384, 832, 0, 0, 0, 64, 576, 64, 0, 0, -64,
    128, 0, 0, 64, 0, -320, 0, 0, -64, 0, 0, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 64, -128, -256, 64, 256, 256, -128, 0, 0,
    -64, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, -256, -64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -128,
    -64, 64, 64, -64, -192, 0, -128, -192, 0, 0, 0, 0, 0, 0, 0, -128, -128, 0, 64, -64, 128, 0, 0, 0, 64, -64, 64, 0,
    64, -512, -64, 0, 0, 64, -192, 0, 0, -64, 192, 0, 0, 64, -192, -192, -192, 192, -256, 0, 0, 0, 64, 0, 0, 192, -192,
    192, -64, 64, 64, 0, 64, -320, 1280, 0, 0, 0, -64, 128, 448, -64, 0, 192, -128, 64, 0, 256, -64, 0, 64, 0, 64,
    -192, 128, -576, -768, -1216, 640, -64, 128, 0, -64, 64, 576, -832, 0, 0, 64, -256, -832, 0, 0, 1024, -448, 0,
    1024, -192, 64, -128, -64, 128, -64, 0, 0, 0, 64, 64, 0, 0, 256, -192, -1088, -896, 128, -256, -896, -64, 0, -64,
    64, 0, -64, 0, 64, 64, -128, 64, 192, 1088, 832, 960, 576, -128, 0, 128, -192, 128, 128, -128, 128, 64, -64, 64, 0,
    0, -128, 320, 448, -64, 0, 64, 256, -448, -896, -448, 128, -128, 0, 0, 0, 0, 0, 0, -64, 64, 0, -192, 1088, 512,
    -64, 256, 512, -576, 384, 0, 64, 0, 0, 0, 0, 0, 0, -64, 64, 0, 0, 0, 0, 0, -128, -128, 128, 0, 0, 320, -64, 0, 0,
    -64, 0, 0, 0, 0, 0, 0, 0, -320, -256, -128, -384, -64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -448, 64, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, -128, 0, -512, -128, 0, 0, 0, 0, 0, 0, -128, -128, 128, -128, 0, 0, 0, 0, 256, 256, 0, 0, 0, 384,
    0, 0, 128, 128, -128, 128, 0, 0, 0, 0, -512, -1024, 0, 0, 0, -128, 0, 0, -128, -128, -128, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 128, 128, -128, -384, 384, 0, 0, 0, -128, 128, 0, 0, 0, 0, 128, -256, 0, 0, -128, 384, 128, 256, -128, 0, 0,
    0, -256, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 128, 128, 0, -384, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, -128, 256, 0,
    -128, 128, 0, 0, 0, 128, 128, 0, 0, 0, 0, 0, -128, 0, 0, 0, -128, 0, -256, 0, 0, 256, 256, 128, -128, 0, -128, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, -256, 256, 0, 0, 128, -256, 128, -128, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128,
    0, 0, 0, 0, -128, -256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, -128, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 128, 0, 0, 0, 0, 0, 0, 0, -64, -64, 32, 0, -32, -64, 0, -32, 256, 192, 96, 0, -32, -192, 0, 128, 160, -416,
    -1696, -96, -64, 0, -64, -480, -224, 800, 256, 96, 224, -800, 832, -384, 160, 640, 192, 224, -160, -416, 64, -64,
    160, -1728, 320, -64, 960, 96, -1472, 352, -288, -32, -64, 32, -576, -64, 256, -96, 96, -160, -128, -32, -160, -64,
    -96, 0, 32, -320, -96, 32, -32, 32, -160, -32, -96, 96, 224, -448, -416, 320, 0, -32, 352, 64, 160, 64, 384, 0,
    -256, 768, -672, -1568, -128, 320, 288, 992, -32, 160, 320, 32, 416, -1824, -1664, 288, 384, -192, -576, 160, 32,
    -96, -128, -32, 416, 672, 256, 352, 96, 224, 224, -64, -96, -32, 0, 64, -448, -608, -224, 32, -32, -32, -96, -64,
    0, 0, -32, -32, -32, -224, 96, 128, 224, -32, -192, -448, -32, -224, 96, -384, -512, -64, 64, -32, -288, 32, 224,
    -672, 800, -128, -64, -736, 64, 64, 96, -128, 704, -128, 160, -128, -64, -64, 128, -224, 0, 0, 96, 64, 544, -192,
    224, 160, 96, 32, -160, 0, 32, 0, 0, 192, 32, -128, 64, 0, -32, 0, -32, -480, -384, -384, -608, -736, 864, 448, 96,
    1184, 352, -384, -480, -512, 928, 800, 1472, 3296, 2752, 1376, 832, 352, 1216, 992, 1792, 2752, 2016, 4096, 3680,
    864, 2304, -992, 1728, 4000, 288, 3104, 2144, 320, 2144, -1088, 1920, 2720, 3264, 3424, 3616, 192, 672, -320, 320,
    -512, 4032, 3456, 2720, -320, 1888, 1664, 1248, 960, 1120, 1696, 480, -96,
];
const DECODED_DWT: [i16; 4096] = [
    -32, 16, 64, 272, -32, -16, 0, -16, -32, -24, -16, -8, 0, -24, -48, -72, -96, -90, -84, -78, -72, -98, -124, -150,
    -176, -192, -208, -224, -240, -256, -272, -288, -304, -304, -304, -304, -304, -336, -368, -400, -432, -450, -468,
    -486, -504, -522, -540, -558, -576, -598, -620, -642, -664, -686, -708, -730, -752, -768, -784, -800, -816, -816,
    -816, -816, 68, 120, 172, 240, 53, 55, 57, 43, 30, 32, 34, 36, 38, 20, 2, -16, -34, -36, -38, -40, -42, -68, -94,
    -120, -146, -149, -152, -186, -221, -228, -234, -241, -247, -255, -262, -269, -276, -303, -330, -357, -384, -404,
    -424, -444, -463, -485, -507, -529, -550, -573, -595, -617, -639, -674, -708, -710, -712, -733, -754, -775, -796,
    -796, -796, -796, 168, 224, 281, 209, 138, 126, 115, 103, 92, 88, 84, 80, 76, 64, 52, 40, 28, 18, 8, -2, -12, -38,
    -64, -90, -116, -106, -95, -148, -201, -199, -196, -193, -190, -205, -219, -233, -247, -270, -292, -314, -336,
    -358, -379, -401, -422, -448, -473, -499, -524, -547, -569, -592, -614, -661, -707, -690, -672, -698, -724, -750,
    -776, -776, -776, -776, 268, 312, 357, 274, 191, 181, 172, 163, 154, 144, 134, 124, 114, 108, 102, 80, 58, 56, 54,
    52, 50, 24, -2, -44, -86, -63, -38, -94, -150, -138, -126, -146, -165, -171, -176, -198, -219, -237, -254, -271,
    -288, -312, -335, -358, -381, -411, -440, -469, -498, -521, -544, -567, -589, -648, -707, -670, -632, -663, -694,
    -725, -756, -756, -756, -756, 368, 401, 434, 339, 244, 237, 230, 223, 216, 200, 184, 168, 152, 152, 152, 120, 88,
    94, 100, 106, 112, 86, 60, 2, -56, -19, 19, -40, -98, -77, -55, -98, -140, -137, -133, -162, -190, -203, -215,
    -228, -240, -265, -290, -315, -340, -373, -406, -439, -472, -495, -518, -541, -564, -635, -706, -649, -592, -628,
    -664, -700, -736, -736, -736, -736, 404, 557, 454, 383, 313, 532, 239, 282, 326, 304, 282, 260, 238, 246, 254, 118,
    238, 196, 154, 32, -90, -88, -86, 76, 238, 242, 247, 28, -191, -232, -273, -123, 29, -63, -155, -151, -146, -164,
    -181, -199, -216, -241, -266, -291, -315, -346, -377, -408, -438, -448, -457, -498, -539, -597, -654, -503, -608,
    -625, -642, -675, -708, -708, -708, -708, 440, 713, 475, 428, 382, 827, 249, 342, 436, 408, 380, 352, 324, 340,
    356, -140, -124, 42, 208, 214, 220, 250, 280, 406, 532, 504, 476, 352, 229, 125, 21, -147, -314, -245, -176, -139,
    -101, -124, -147, -170, -192, -217, -241, -266, -290, -319, -347, -376, -404, -400, -395, -455, -514, -558, -601,
    -357, -624, -622, -620, -650, -680, -680, -680, -680, 604, 677, 495, 457, 419, 770, 354, 386, 418, 416, 414, 380,
    346, 258, -342, -302, -6, 288, 582, 604, 626, 588, 550, 688, 826, 829, 833, 724, 616, 482, 347, 181, 15, -139,
    -293, -175, -57, -85, -113, -141, -168, -193, -217, -241, -265, -292, -318, -344, -370, -352, -334, -412, -489,
    -487, -485, -403, -576, -587, -598, -625, -652, -652, -652, -652, 1280, 1154, 1028, 998, 968, 970, 460, 430, 400,
    424, 448, 408, 368, 432, -528, -208, 112, 534, 956, 994, 1032, 926, 820, 970, 1120, 1155, 1190, 1097, 1004, 839,
    674, 509, 344, 223, 102, 45, -12, -45, -78, -111, -144, -168, -192, -216, -240, -264, -288, -312, -336, -304, -272,
    -368, -464, -416, -368, -448, -528, -552, -576, -600, -624, -624, -624, -624, 770, 671, 573, 554, 536, 629, 467,
    464, 462, 492, 523, 490, 457, 281, -406, -101, 204, 599, 995, 1310, 1370, 1297, 1225, 1296, 1368, 1433, 1498, 1403,
    1308, 1185, 1062, 875, 688, 586, 485, 304, 123, -83, -32, -77, -122, -175, -227, -200, -172, -194, -217, -239,
    -261, -315, -368, -326, -283, -361, -438, -452, -465, -515, -565, -583, -601, -617, -633, -633, 772, 701, 630, 623,
    616, 545, 474, 499, 524, 561, 599, 572, 546, 131, -283, 6, 296, 665, 1034, 1627, 1708, 1669, 1630, 1623, 1616,
    1711, 1806, 1709, 1612, 1531, 1450, 1241, 1032, 950, 869, 563, 258, -120, 15, -43, -100, -181, -262, -183, -103,
    -124, -145, -166, -186, -325, -464, -283, -102, -305, -508, -455, -402, -478, -554, -566, -578, -610, -642, -642,
    774, 730, 687, 675, 664, 620, 577, 581, 586, 598, 610, 590, 571, -147, -97, 209, 516, 794, 1073, 1575, 1822, 1976,
    1875, 1869, 1864, 1989, 2114, 2015, 1916, 1877, 1838, 1607, 1376, 1266, 1156, 902, 137, -61, -3, -121, -238, -124,
    -9, -70, -131, -166, -201, -221, -239, -272, -304, -129, -209, -298, -386, -427, -467, -937, -895, -549, -459,
    -667, -619, -619, 776, 760, 744, 728, 712, 696, 680, 664, 648, 635, 622, 609, 596, -425, 90, 413, 736, 924, 1112,
    1524, 1936, 2284, 2120, 2116, 2112, 2267, 2422, 2321, 2220, 2223, 2226, 1973, 1720, 1582, 1444, 1242, 16, -2, -20,
    58, 136, -66, -267, -213, -158, -208, -257, -275, -292, -218, -144, 26, -316, -290, -264, -142, -20, 2956, 2860,
    -788, -852, -980, -596, -596, 826, 807, 789, 770, 752, 749, 747, 744, 742, 677, 613, 517, 421, -286, 288, 574, 860,
    1081, 1303, 1668, 2034, 2313, 2337, 2344, 2352, 2453, 2554, 2575, 2596, 2507, 2418, 2249, 2080, 1961, 1843, 925, 7,
    40, 74, 748, 654, 451, 250, 48, -154, -108, -62, -112, -161, -29, 104, 44, -271, -275, -278, -842, 1411, 3007,
    3323, 327, -1389, -1197, -493, -493, 876, 855, 834, 813, 792, 803, 814, 825, 836, 720, 605, 681, 758, 110, 487,
    735, 984, 1239, 1494, 1813, 2132, 2343, 2554, 2573, 2592, 2639, 2686, 2829, 2972, 2791, 2610, 2525, 2440, 2341,
    2243, 608, -2, 83, 169, 1438, 1172, 969, 767, 565, 363, 248, 134, 52, -30, -95, -160, -193, -226, -259, -292, 763,
    -742, 2290, 1738, -1118, -902, -902, -390, -390, 926, 902, 879, 855, 832, 824, 817, 809, 802, 763, 724, 397, 2375,
    970, 589, 848, 1108, 1396, 1685, 1941, 2198, 2468, 2739, 2785, 2832, 2889, 2946, 3179, 2900, 3059, 2962, 2849,
    2736, 2897, 2546, -365, 309, 206, 871, 1760, 1626, 1471, 1316, 1146, 975, 844, 714, 599, 485, 350, 216, 145, 75,
    -356, 750, 2687, 529, -1067, -615, -835, -799, -847, -383, -383, 976, 950, 924, 898, 872, 846, 820, 794, 768, 806,
    844, 882, 1432, 2598, 692, 962, 1232, 1554, 1876, 2070, 2264, 2594, 2924, 2998, 3072, 3139, 3206, 3273, 2316, 3071,
    3314, 3173, 3032, 2941, 1826, -57, 108, 73, 1574, 2083, 2080, 1973, 1866, 1727, 1588, 1441, 1294, 1147, 1000, 796,
    592, 484, 376, 828, 256, 772, -248, -72, -408, 984, -184, -536, -376, -376, 1026, 997, 969, 941, 913, 888, 864,
    840, 816, 762, 709, 768, 1339, 2269, 2176, 1411, 1414, 1677, 1941, 2188, 2436, 2730, 3023, 3157, 3291, 3350, 3409,
    3420, 2152, 3001, 3594, 3403, 3213, 3234, 951, 12, 97, -302, 2883, 2756, 2373, 2312, 2252, 2144, 2036, 1861, 1687,
    1545, 1403, 1254, 1106, 974, 842, 1229, 1105, 21, 217, 46, -381, 1912, 3181, 2765, 301, -723, 1076, 1045, 1015,
    984, 954, 931, 909, 886, 864, 719, 575, 654, 1246, 1685, 3149, 1604, 1596, 1801, 2006, 2307, 2609, 2866, 3123,
    3316, 3510, 3561, 3613, 3568, 1988, 2931, 3875, 3634, 3394, 3527, 76, 81, 86, 859, 3168, 2917, 2666, 2652, 2639,
    2561, 2484, 2282, 2081, 1943, 1806, 1713, 1621, 1464, 1308, 1119, 931, 550, 170, -92, -354, 1560, 3986, 1970, -558,
    -558, 1126, 1093, 1060, 1027, 995, 974, 953, 932, 912, 900, 888, -340, 1249, 1757, 2521, 2421, 1810, 2036, 2263,
    2522, 2781, 3066, 3351, 3443, 3537, 3612, 3688, 3476, 2496, 3021, 3803, 3833, 3863, 2844, 33, 134, -21, 2100, 3197,
    3062, 2927, 2944, 2961, 2882, 2804, 2607, 2410, 2309, 2209, 2140, 2071, 1842, 1614, 1329, 1044, 663, 283, 10, -263,
    -488, -201, -201, -457, -457, 1176, 1141, 1106, 1071, 1036, 1017, 998, 979, 960, 825, 690, 203, 740, 1573, 1894,
    3239, 2024, 2272, 2521, 2737, 2954, 3010, 3067, 3315, 3564, 3664, 3764, 3384, 3004, 3112, 3732, 3776, 3820, 1905,
    -10, 187, -128, 3341, 3226, 3207, 3188, 3236, 3284, 3204, 3124, 2932, 2740, 2676, 2612, 2567, 2522, 2221, 1920,
    1539, 1158, 777, 396, 112, -172, -488, -292, -324, -356, -356, 1194, 1162, 1131, 1100, 1069, 1047, 1026, 973, 920,
    969, 507, 381, 767, 1428, 1834, 2800, 2486, 2347, 2722, 2920, 3118, 3290, 3462, 3266, 3071, 3157, 3243, 3521, 3800,
    3674, 3548, 3710, 3873, 874, 179, 92, 517, 3440, 3291, 3334, 3377, 3403, 3430, 3361, 3292, 3174, 3057, 3004, 2951,
    2761, 2572, 2223, 1874, 1554, 1235, 884, 533, 220, -93, -470, -335, -319, -303, -303, 1212, 1184, 1157, 1129, 1102,
    1078, 1055, 967, 880, 1114, 325, 559, 794, 1284, 1775, 2361, 2948, 2423, 2923, 3103, 3283, 3314, 3346, 3474, 3602,
    3674, 3747, 3659, 3572, 3980, 3877, 3901, 3926, -157, 368, 253, 1674, 3795, 3356, 3461, 3566, 3571, 3577, 3518,
    3460, 3417, 3375, 3332, 3290, 2956, 2623, 2225, 1828, 1570, 1313, 991, 670, 328, -14, -452, -378, -314, -250, -250,
    1230, 1206, 1182, 1158, 1135, 1109, 1083, 1025, 968, 779, 78, 481, 885, 1284, 1939, 2466, 3250, 2627, 2772, 3158,
    3543, 3514, 3486, 3729, 3717, 3775, 3834, 3781, 3728, 3934, 3885, 3916, 2667, 92, 333, 174, 2831, 3702, 3549, 3588,
    3627, 3643, 3659, 3643, 3628, 3676, 3724, 3436, 3149, 2847, 2545, 2275, 2006, 1730, 1454, 1114, 775, 388, 1, -402,
    -293, -309, -325, -325, 1248, 1228, 1208, 1188, 1168, 1140, 1112, 1084, 1056, 700, 344, 660, 976, 1284, 2104, 2316,
    3040, 2319, 2110, 2189, 2268, 2691, 3114, 3729, 3832, 3877, 3922, 3903, 3884, 3889, 3894, 3931, 1408, 341, 298, 95,
    3988, 3609, 3742, 3715, 3688, 3715, 3742, 3769, 3796, 3679, 3562, 3285, 3008, 2738, 2468, 2326, 2184, 1890, 1596,
    1238, 880, 448, 16, -352, -208, -304, -400, -400, 1296, 1284, 1272, 1260, 1249, 1165, 1081, 1093, 1106, 232, 382,
    677, 971, 973, 1232, 834, 693, 538, 639, 565, 490, 563, 637, -106, 944, 2358, 3773, 3795, 4074, 3964, 3855, 4337,
    212, 204, 197, 1342, 4023, 3813, 3860, 3811, 3762, 3766, 3771, 3776, 3781, 3604, 3427, 3202, 2977, 2838, 2699,
    2400, 2101, 1982, 1607, 1280, 954, 545, -120, -321, -266, -314, -362, -362, 1344, 1340, 1337, 1333, 1330, 1190,
    1051, 1103, 1156, 20, 933, 950, 967, 919, 872, 889, 906, 805, 705, 733, 761, 740, 720, 668, 616, 328, 40, 1640,
    3752, 3784, 3816, 3208, 40, 580, 97, 2589, 4058, 4018, 3979, 3907, 3836, 3818, 3801, 3784, 3767, 3529, 3292, 3375,
    3458, 3706, 3954, 3754, 3555, 2843, 1619, 1067, 516, 386, -256, -290, -324, -324, -324, -324, 1392, 1364, 1337,
    1310, 1283, 1247, 1212, 969, 982, 1424, 1100, 1079, 1058, 1073, 1088, 815, 799, 1056, 803, 773, 743, 645, 547, 769,
    736, 649, 563, 332, 102, 1939, 4033, 1982, 444, 332, -36, 4076, 4093, 4047, 4001, 3955, 3910, 3870, 3831, 3791,
    3752, 3806, 3861, 3836, 3811, 3678, 3545, 3380, 3216, 3639, 3807, 2342, 1134, 1091, 24, -387, -286, -286, -286,
    -286, 1440, 1389, 1338, 1287, 1236, 1305, 1374, 1091, 1320, 1037, 1267, 1208, 1150, 715, 281, 486, 1204, 1564, 901,
    1325, 1750, 1830, 1911, 1383, 344, 459, 574, 817, 548, 351, 666, 757, 336, 340, 856, 4028, 4128, 4076, 4024, 4004,
    3984, 3922, 3861, 3799, 3738, 3828, 3919, 3785, 3652, 3394, 3137, 3007, 2878, 2900, 2923, 3105, 3800, 1284, 1328,
    28, -248, -248, -248, -248, 1456, 1407, 1358, 1309, 1261, 1210, 1159, 1444, 1218, 1265, 33, -655, -1343, -977,
    -355, 394, 1401, 1753, 1338, 1739, 2140, 2575, 3010, 3524, 3784, 2536, 1033, 265, 522, 440, 615, 629, 388, 403,
    2211, 4051, 4099, 4078, 4058, 3990, 3922, 3910, 3898, 3886, 3875, 3805, 3736, 3554, 3373, 3126, 2880, 2585, 2291,
    2026, 1762, 2650, 3026, 2303, 2092, 665, -250, -250, -250, -250, 1472, 1425, 1379, 1332, 1286, 1371, 1457, 1030,
    -932, -1834, -1712, -1238, -763, -621, 33, 815, 1598, 1943, 1776, 2153, 2531, 2808, 3085, 3362, 3640, 4102, 4052,
    3042, 496, 530, 564, 502, 440, 211, 3055, 3818, 4070, 4081, 4093, 3976, 3860, 3898, 3936, 3974, 4013, 3783, 3553,
    3323, 3094, 2858, 2623, 2420, 2217, 1921, 1626, 915, 2764, 250, 296, 22, -252, -252, -252, -252, 1488, 1443, 1399,
    1371, 1343, 1308, 1530, -408, -1834, -1590, -1089, -813, -536, -281, 485, 1172, 1859, 2132, 2150, 2503, 2857, 3105,
    3352, 3536, 3720, 3875, 3775, 4298, 4054, 2123, 449, 502, 556, 547, 26, 2113, 3945, 4116, 4031, 3946, 3862, 3838,
    3814, 3982, 3894, 3488, 3338, 3140, 2943, 2622, 2302, 2030, 1758, 1496, 1234, 1260, 774, -347, -188, -189, -190,
    -222, -254, -254, 1504, 1462, 1420, 1410, 1400, 1246, 1604, -1334, -1712, -1089, -978, -643, -308, 59, 938, 1529,
    2120, 2322, 2524, 2854, 3184, 3402, 3620, 3710, 3800, 3905, 4010, 4019, 4028, 3973, 334, 503, 672, 627, 582, 409,
    236, 2359, 3970, 3917, 3864, 3778, 3692, 3990, 3776, 3194, 3124, 2958, 2792, 2387, 1982, 1641, 1300, 1071, 842, 69,
    -192, -176, -160, -144, -128, -192, -256, -256, 1546, 1496, 1447, 1430, 1413, 1627, 1330, -2103, -1184, -820, -712,
    -396, -80, 406, 1148, 1714, 2280, 2486, 2692, 2995, 3297, 3467, 3638, 3712, 3787, 3916, 4045, 3918, 4047, 3098,
    357, 656, 699, 198, 466, 381, 297, 376, 200, 1815, 3431, 3568, 3961, 4114, 3755, 3310, 3121, 2804, 2487, 2209,
    1931, 1189, 447, 37, -117, -255, -136, -111, -86, -109, -132, -196, -260, -260, 1588, 1531, 1475, 1450, 1426, 1497,
    33, -1592, -1168, -807, -446, -149, 148, 753, 1358, 1899, 2440, 2650, 2861, 3136, 3411, 3533, 3656, 3715, 3774,
    3927, 4080, 3817, 4066, 2223, 380, 553, 214, 3610, 350, 354, 358, 442, 526, 226, -74, 286, 1158, 1678, 1686, 1634,
    1582, 1114, 646, 239, -168, -31, 107, -228, -51, -66, -80, -46, -12, -74, -136, -200, -264, -264, 1630, 1566, 1502,
    1470, 1439, 1591, -817, -1401, -960, -634, -308, -14, 280, 876, 1472, 1972, 2472, 2718, 2966, 3229, 3492, 3583,
    3674, 3701, 3729, 3794, 3859, 4148, 4181, 708, 563, 418, 1297, 3917, 4234, 2198, 163, 267, 372, 348, 325, 108, 147,
    186, -31, 38, 107, 96, 85, 61, 37, -163, -106, -126, 111, 875, -152, -93, -34, -87, -140, -204, -268, -268, 1672,
    1601, 1530, 1491, 1452, 1685, -1666, -1209, -752, -461, -170, 121, 412, 999, 1586, 2045, 2504, 2787, 3071, 3322,
    3574, 3633, 3693, 3688, 3684, 3661, 3638, 3711, 2760, 473, 746, 283, 2380, 4225, 4022, 4043, 4064, 2141, 218, 215,
    212, 186, 160, 230, 300, 234, 168, 102, 36, -117, -269, 218, 1218, 2025, 2833, 1048, -224, -140, -56, -100, -144,
    -208, -272, -272, 1626, 1607, 1589, 1459, 1585, 692, -1480, -1108, -736, -452, -168, 116, 400, 806, 1468, 1938,
    2408, 2703, 2999, 3327, 3655, 3569, 3483, 3620, 3759, 3440, 3121, 1602, 851, 820, 533, 438, 3415, 4252, 4066, 4055,
    4045, 4084, 4124, 2995, 1867, 1068, 269, 62, -145, -38, 69, 704, 1339, 2183, 3028, 2816, 2861, 2953, 2790, -349,
    96, -19, -134, -137, -140, -204, -268, -268, 1580, 1614, 1649, 1427, 1718, -300, -1293, -1007, -720, -443, -166,
    111, 388, 613, 1350, 1831, 2312, 2620, 2928, 3076, 3225, 3249, 3273, 3297, 3322, 3475, 3628, 3333, 1502, 655, 832,
    593, 3938, 4024, 4110, 4068, 4026, 3980, 3934, 3984, 4034, 3998, 3962, 3990, 4018, 3786, 3554, 3610, 3666, 3459,
    3253, 3111, 2969, 2858, 2236, -210, -96, -154, -212, -174, -136, -200, -264, -264, 1662, 1653, 1644, 1619, 1851,
    -988, -1267, -986, -704, -402, -100, 10, 120, 404, 944, 1580, 2216, 2504, 2793, 2873, 2954, 2977, 2999, 3086, 3173,
    3238, 3303, 3576, 521, 554, 587, 1772, 3981, 4019, 4058, 4032, 4007, 3971, 3936, 3948, 3961, 3920, 3879, 3806,
    3989, 3866, 3743, 3636, 3529, 3375, 3222, 3069, 2916, 2907, 1362, -119, -64, -113, -162, -147, -132, -196, -260,
    -260, 1744, 1692, 1640, 1556, 1472, -1932, -1240, -964, -688, -361, -34, 165, 364, 707, 1050, 1585, 2120, 2389,
    2658, 2671, 2684, 2705, 2726, 2875, 3024, 3001, 2978, 2283, 564, 965, 342, 2951, 4024, 4015, 4006, 3997, 3988,
    3963, 3938, 3913, 3888, 3842, 3796, 3622, 3960, 3946, 3932, 3662, 3392, 3292, 3192, 3028, 2864, 2956, 488, -28,
    -32, -72, -112, -120, -128, -192, -256, -256, 1834, 1635, 1692, 1718, 207, -1664, -1230, -925, -619, -285, 50, 256,
    719, 706, 948, 1127, 1562, 1845, 2129, 2236, 2344, 2448, 2551, 2655, 2759, 2739, 2719, 1563, 663, 623, 327, 4207,
    3992, 4013, 4034, 3991, 3948, 3923, 3898, 3873, 3848, 3774, 3701, 3484, 3523, 3726, 3929, 3812, 3695, 3604, 3513,
    3407, 3300, 3349, -441, -232, -22, -48, -74, -100, -126, -174, -222, -222, 1924, 1578, 1745, 1880, -1057, -1395,
    -1220, -885, -550, -208, 134, 92, 563, 449, 847, 669, 1004, 1302, 1600, 1802, 2005, 2191, 2377, 2435, 2494, 2477,
    2460, 843, 763, 794, 1337, 3928, 3960, 4011, 4062, 3985, 3908, 3883, 3858, 3833, 3808, 3707, 3607, 3603, 3599,
    3506, 3414, 3706, 3998, 3916, 3835, 3786, 3737, 2207, -346, 77, -12, -24, -36, -80, -124, -156, -188, -188, 1598,
    1585, 1830, 2154, -1874, -1414, -1210, -558, -417, -516, -102, 440, 214, 192, 682, 435, 702, 870, 1039, 1224, 1409,
    1710, 2011, 2039, 2069, 2087, 1849, 795, 766, 596, 2475, 3953, 3896, 3929, 3962, 3915, 3868, 3843, 3818, 3793,
    3768, 3688, 3609, 3577, 3546, 3462, 3379, 3312, 3245, 3364, 3485, 3189, 2893, 857, -155, 33, -34, -48, -62, -108,
    -154, -154, -154, -154, 1784, 1849, 1915, 892, -1666, -1177, -1711, -742, -796, -823, 175, -748, 378, 191, 517,
    202, 400, 439, 479, 646, 814, 1229, 1645, 1644, 1644, 1697, 1239, 748, 770, 399, 3613, 3978, 3832, 3847, 3862,
    3845, 3828, 3803, 3778, 3753, 3728, 3669, 3611, 3552, 3494, 3419, 3345, 3174, 3004, 2813, 2623, 2592, 2562, -237,
    37, -10, -56, -72, -88, -136, -184, -152, -120, -120, 1802, 1900, 2255, -286, -1291, -1130, -713, -393, -327, -387,
    -445, 200, -179, 436, 27, -46, -118, 203, 270, 384, 498, 686, 874, 998, 1123, 1253, 1128, 794, 717, 1161, 3654,
    3843, 3776, 3789, 3802, 3783, 3764, 3617, 3726, 3691, 3656, 3596, 3536, 3476, 3417, 3341, 3266, 3078, 2891, 2687,
    2484, 2617, 1982, -29, 8, 12, 18, -18, -54, 6, 66, -30, -126, -126, 1820, 1696, 2084, -2232, -1939, -571, -1763,
    -1835, -1394, -462, -553, -388, -223, -1111, -462, -37, -124, -32, -451, -134, 183, 143, 104, 353, 602, 809, 1017,
    841, 665, 1924, 3696, 3708, 3720, 3731, 3742, 3721, 3700, 3431, 3674, 3629, 3584, 3523, 3462, 3401, 3341, 3264,
    3187, 2982, 2778, 2562, 2346, 2386, 891, -77, -21, 35, 92, 36, -20, -108, -196, -164, -132, -132, 1710, 1955, 1177,
    -2834, -956, -2076, -2173, -365, -1885, -1353, -821, -1600, -844, -1250, -887, -653, -674, -555, -436, -636, -325,
    -304, -282, -101, -175, 493, 906, 871, 580, 2767, 3674, 3653, 3632, 3657, 3682, 3627, 3572, 3437, 3558, 3535, 3512,
    3450, 3388, 3326, 3264, 3186, 3108, 2902, 2697, 2500, 2304, 2219, 343, 179, 270, 154, 38, -6, -50, -110, -170,
    -154, -138, -138, 1600, 1959, -242, -2667, -2020, -2557, -2582, -1455, 696, 316, 960, 2052, 2120, 1940, 1760, 1292,
    824, -310, -932, -1394, -832, -750, -668, -298, -440, 434, 796, 902, 496, 3610, 3652, 3598, 3544, 3583, 3622, 3533,
    3444, 3443, 3442, 3441, 3440, 3377, 3314, 3251, 3188, 3109, 3030, 2823, 2616, 2439, 2262, 2053, -204, 179, 50, 17,
    -16, -48, -80, -112, -144, -144, -144, -144, 1956, 1852, -2091, -3026, -1145, 322, 2045, 1672, 1555, 1328, 1614,
    1916, 1706, 1622, 1282, 1502, 1466, 1301, 1393, 940, -792, -1548, -769, -821, -617, 926, 934, 909, 1397, 3323,
    3456, 3446, 3436, 3393, 3351, 3388, 3426, 3374, 3321, 3445, 3313, 3265, 3217, 3153, 3090, 2998, 2906, 2686, 2467,
    2291, 2115, 1283, -61, 137, 79, 37, -5, -37, -69, -101, -133, -133, -133, -133, 1800, 1746, 669, 1992, 1779, 1665,
    1552, 1727, 1390, 1317, 1245, 1269, 1293, 1560, 1316, 1456, 1084, 1121, 1158, 971, 1297, 726, -869, -1344, -794,
    1419, 1072, 917, 2299, 3036, 3261, 3294, 3328, 3204, 3080, 3244, 3409, 3305, 3201, 3449, 3186, 3153, 3121, 3056,
    2992, 2887, 2783, 2550, 2318, 2143, 1968, 513, 82, 95, 108, 57, 6, -26, -58, -90, -122, -122, -122, -122, 1516,
    1832, 1637, 1905, 1406, 1344, 1283, 1590, 1641, 1466, 1292, 1277, 1263, 1386, 1254, 1314, 1118, 1116, 1115, 906,
    953, 1160, 1111, 117, -363, 807, 698, 701, 2240, 3325, 2362, 2934, 3252, 2998, 2745, 2924, 3103, 3156, 2953, 3277,
    3091, 3057, 3024, 2959, 2894, 2776, 2659, 2414, 2169, 2075, 1981, 255, 65, 69, 73, 45, 17, -15, -47, -79, -111,
    -111, -111, -111, 1744, 1662, 1581, 1563, 1546, 1536, 1527, 1453, 1380, 1359, 1339, 1286, 1234, 1213, 1193, 1172,
    1152, 1112, 1073, 1097, 1122, 826, 1043, 1067, 1092, 964, 837, 741, 2182, 2078, 2487, 2831, 2664, 2793, 2923, 2860,
    2798, 3007, 2705, 3106, 2996, 2962, 2928, 2862, 2796, 2666, 2536, 2278, 2020, 1751, 1482, -259, 48, 43, 38, 33, 28,
    -4, -36, -68, -100, -100, -100, -100, 1684, 1640, 1596, 1584, 1573, 1543, 1514, 1452, 1391, 1360, 1329, 1282, 1236,
    1213, 1191, 1168, 1146, 1107, 1070, 1064, 1058, 920, 1038, 996, 955, 924, 895, 881, 1635, 1679, 2235, 2439, 2132,
    2451, 2772, 2580, 2644, 2714, 2528, 2742, 2701, 2828, 2699, 2570, 2442, 2383, 2324, 2105, 1887, 1733, 811, -79, 55,
    63, 71, 47, 23, -7, -37, -67, -97, -113, -129, -129, 1624, 1618, 1612, 1606, 1601, 1551, 1501, 1451, 1402, 1361,
    1320, 1279, 1239, 1214, 1189, 1164, 1140, 1103, 1067, 1031, 995, 1014, 1034, 926, 818, 885, 953, 1021, 1089, 1024,
    1472, 2048, 2112, 2110, 2109, 2044, 2491, 2421, 2352, 2379, 2406, 2694, 2471, 2279, 2088, 2100, 2113, 1933, 1754,
    1715, 140, 101, 62, 83, 104, 61, 18, -10, -38, -66, -94, -126, -158, -158, 1724, 1788, 1852, 1692, 1532, 1494,
    1456, 1418, 1381, 1346, 1311, 1276, 1241, 1214, 1187, 1160, 1134, 1099, 1064, 1030, 995, 996, 998, 935, 873, 878,
    883, 793, 702, 657, 1125, 1832, 2284, 1193, 1638, 1796, 2209, 2320, 2176, 2239, 2047, 2560, 2562, 1892, 1734, 1673,
    1613, 1745, 1621, 1153, -83, -7, 69, 71, 73, 43, 13, -13, -39, -65, -91, -139, -187, -187, 1824, 1702, 1580, 1522,
    1464, 1438, 1412, 1386, 1360, 1331, 1302, 1273, 1244, 1215, 1186, 1157, 1128, 1095, 1062, 1029, 996, 979, 962, 945,
    928, 871, 814, 821, 828, 803, 1290, 1617, 1944, 2068, 1168, 1292, 1416, 1708, 1488, 1844, 1688, 2171, 2142, 1249,
    1380, 1503, 1626, 1045, -48, 79, 206, 141, 76, 59, 42, 25, 8, -16, -40, -64, -88, -152, -216, -216, 1688, 1615,
    1542, 1501, 1460, 1429, 1398, 1367, 1336, 1310, 1284, 1258, 1232, 1206, 1180, 1154, 1128, 1093, 1058, 1023, 988,
    969, 950, 931, 912, 862, 812, 794, 776, 596, 672, 972, 1272, 330, 924, 1038, 1152, 1298, 1444, 1910, 1608, 1532,
    1200, 516, 344, 260, 176, 252, 72, 123, 174, 129, 84, 65, 46, 27, 8, -18, -44, -70, -96, -144, -192, -192, 1552,
    1528, 1504, 1480, 1456, 1420, 1384, 1348, 1312, 1289, 1266, 1243, 1220, 1197, 1174, 1151, 1128, 1091, 1054, 1017,
    980, 959, 938, 917, 896, 853, 810, 767, 724, 645, 566, 583, 600, 640, 680, 528, 376, 376, 888, 1464, 1016, 637,
    258, 295, 332, 297, 262, 227, 192, 167, 142, 117, 92, 71, 50, 29, 8, -20, -48, -76, -104, -136, -168, -168, 1544,
    1521, 1498, 1475, 1452, 1411, 1370, 1329, 1288, 1268, 1248, 1228, 1208, 1188, 1168, 1148, 1128, 1089, 1050, 1011,
    972, 949, 926, 903, 880, 844, 808, 772, 736, 678, 620, 610, 600, 614, 628, 546, 464, 238, 2060, 1690, 1576, 1710,
    308, 314, 320, 286, 252, 218, 184, 163, 142, 121, 100, 77, 54, 31, 8, -22, -52, -82, -112, -128, -144, -144, 1536,
    1514, 1492, 1470, 1448, 1402, 1356, 1310, 1264, 1247, 1230, 1213, 1196, 1179, 1162, 1145, 1128, 1087, 1046, 1005,
    964, 939, 914, 889, 864, 835, 806, 777, 748, 711, 674, 637, 600, 588, 576, 564, 552, 612, 160, 1916, 1112, 223,
    358, 333, 308, 275, 242, 209, 176, 159, 142, 125, 108, 83, 58, 33, 8, -24, -56, -88, -120, -120, -120, -120, 1536,
    1514, 1492, 1470, 1448, 1402, 1356, 1310, 1264, 1247, 1230, 1213, 1196, 1179, 1162, 1145, 1128, 1087, 1046, 1005,
    964, 939, 914, 889, 864, 835, 806, 777, 748, 711, 674, 637, 600, 588, 576, 564, 552, 644, 480, 108, 504, 159, 326,
    317, 308, 275, 242, 209, 176, 159, 142, 125, 108, 83, 58, 33, 8, -24, -56, -88, -120, -120, -120, -120, 1536, 1514,
    1492, 1470, 1448, 1402, 1356, 1310, 1264, 1247, 1230, 1213, 1196, 1179, 1162, 1145, 1128, 1087, 1046, 1005, 964,
    939, 914, 889, 864, 835, 806, 777, 748, 711, 674, 637, 600, 588, 576, 564, 552, 420, 288, 348, 408, 351, 294, 301,
    308, 275, 242, 209, 176, 159, 142, 125, 108, 83, 58, 33, 8, -24, -56, -88, -120, -120, -120, -120, 1536, 1514,
    1492, 1470, 1448, 1402, 1356, 1310, 1264, 1247, 1230, 1213, 1196, 1179, 1162, 1145, 1128, 1087, 1046, 1005, 964,
    939, 914, 889, 864, 835, 806, 777, 748, 711, 674, 637, 600, 588, 576, 564, 552, 420, 288, 348, 408, 351, 294, 301,
    308, 275, 242, 209, 176, 159, 142, 125, 108, 83, 58, 33, 8, -24, -56, -88, -120, -120, -120, -120,
];
